﻿using UnityEngine;
using System.Collections;
using UnityEngine.SocialPlatforms;
using GooglePlayGames;

public class gameCenterAndroid : MonoBehaviour {
	#if UNITY_ANDROID
	private bool success=false;

	public Sprite spriteAppuye;
	public Sprite sprite;

	void OnMouseDown () {
		this.GetComponent<SpriteRenderer> ().sprite = spriteAppuye;
		
	}
	void OnMouseUp(){
		this.GetComponent<SpriteRenderer> ().sprite = sprite;
		if (!Social.localUser.authenticated) {
			((PlayGamesPlatform)Social.Active).ShowLeaderboardUI("CgkIs8_I_fYfEAIQAQ");
			
		} else {
			
			((GooglePlayGames.PlayGamesPlatform) Social.Active).SignOut();
		}
	}

#endif
}
